using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class ARC_OeMap : EntityTypeConfiguration<ARC_Oe>
    {
        public ARC_OeMap()
        {
            // Primary Key
            this.HasKey(t => new { t.TYPE, t.NUMBER });

            // Properties
            this.Property(t => t.ID)
                .IsRequired()
                .HasMaxLength(6);

            this.Property(t => t.TYPE)
                .IsRequired()
                .IsFixedLength()
                .HasMaxLength(1);

            this.Property(t => t.NUMBER)
                .IsRequired()
                .HasMaxLength(8);

            this.Property(t => t.SALESMAN)
                .HasMaxLength(10);

            this.Property(t => t.NUMBERFROM)
                .HasMaxLength(8);

            this.Property(t => t.NUMBERTO)
                .HasMaxLength(8);

            this.Property(t => t.TAXAUTH)
                .HasMaxLength(15);

            this.Property(t => t.SHIPTO1)
                .HasMaxLength(35);

            this.Property(t => t.SHIPTO2)
                .HasMaxLength(35);

            this.Property(t => t.SHIPTO3)
                .HasMaxLength(35);

            this.Property(t => t.SHIPTO4)
                .HasMaxLength(35);

            this.Property(t => t.SHIPTO5)
                .HasMaxLength(35);

            this.Property(t => t.SHIPTO6)
                .HasMaxLength(35);

            this.Property(t => t.PONUMBER)
                .HasMaxLength(15);

            this.Property(t => t.TERMS)
                .HasMaxLength(15);

            this.Property(t => t.ENTITY)
                .HasMaxLength(4);

            this.Property(t => t.ORDPOSTED)
                .HasMaxLength(1);

            this.Property(t => t.SYSPDSTART)
                .HasMaxLength(4);

            this.Property(t => t.ARBATCH)
                .HasMaxLength(8);

            this.Property(t => t.OEBATCH)
                .HasMaxLength(8);

            this.Property(t => t.GUAR1_ID)
                .HasMaxLength(6);

            this.Property(t => t.GUAR2_ID)
                .HasMaxLength(6);

            this.Property(t => t.APBATCH)
                .HasMaxLength(8);

            this.Property(t => t.ADMISIONID)
                .IsRequired()
                .HasMaxLength(10);

            this.Property(t => t.File_Primary_Key)
                .HasMaxLength(10);

            this.Property(t => t.vglbatch)
                .HasMaxLength(10);

            this.Property(t => t.Bill_)
                .HasMaxLength(8);

            this.Property(t => t.MasterItem)
                .HasMaxLength(10);

            this.Property(t => t.Vglbatch1)
                .HasMaxLength(50);

            this.Property(t => t.Vglbatch2)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.Reference)
                .HasMaxLength(20);

            this.Property(t => t.OE_TrackNB)
                .HasMaxLength(20);

            // Table & Column Mappings
            this.ToTable("ARC_Oe");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.TYPE).HasColumnName("TYPE");
            this.Property(t => t.NUMBER).HasColumnName("NUMBER");
            this.Property(t => t.SALESMAN).HasColumnName("SALESMAN");
            this.Property(t => t.NUMBERFROM).HasColumnName("NUMBERFROM");
            this.Property(t => t.NUMBERTO).HasColumnName("NUMBERTO");
            this.Property(t => t.DATE).HasColumnName("DATE");
            this.Property(t => t.COST).HasColumnName("COST");
            this.Property(t => t.TAXAUTH).HasColumnName("TAXAUTH");
            this.Property(t => t.SALESTAX).HasColumnName("SALESTAX");
            this.Property(t => t.FEDTAX).HasColumnName("FEDTAX");
            this.Property(t => t.SHIPTO1).HasColumnName("SHIPTO1");
            this.Property(t => t.SHIPTO2).HasColumnName("SHIPTO2");
            this.Property(t => t.SHIPTO3).HasColumnName("SHIPTO3");
            this.Property(t => t.SHIPTO4).HasColumnName("SHIPTO4");
            this.Property(t => t.SHIPTO5).HasColumnName("SHIPTO5");
            this.Property(t => t.SHIPTO6).HasColumnName("SHIPTO6");
            this.Property(t => t.ONACCOUNT).HasColumnName("ONACCOUNT");
            this.Property(t => t.PRINTED).HasColumnName("PRINTED");
            this.Property(t => t.POSTED).HasColumnName("POSTED");
            this.Property(t => t.COMMENTS).HasColumnName("COMMENTS");
            this.Property(t => t.CLOSED).HasColumnName("CLOSED");
            this.Property(t => t.PONUMBER).HasColumnName("PONUMBER");
            this.Property(t => t.TERMS).HasColumnName("TERMS");
            this.Property(t => t.JOBID).HasColumnName("JOBID");
            this.Property(t => t.ENTITY).HasColumnName("ENTITY");
            this.Property(t => t.ORDPOSTED).HasColumnName("ORDPOSTED");
            this.Property(t => t.CURRENCY).HasColumnName("CURRENCY");
            this.Property(t => t.SUBTOTALA).HasColumnName("SUBTOTALA");
            this.Property(t => t.PATPERC).HasColumnName("PATPERC");
            this.Property(t => t.INS1PERC).HasColumnName("INS1PERC");
            this.Property(t => t.INS2PERC).HasColumnName("INS2PERC");
            this.Property(t => t.SYSPDSTART).HasColumnName("SYSPDSTART");
            this.Property(t => t.ARBATCH).HasColumnName("ARBATCH");
            this.Property(t => t.OEBATCH).HasColumnName("OEBATCH");
            this.Property(t => t.GUAR1_ID).HasColumnName("GUAR1_ID");
            this.Property(t => t.GUAR2_ID).HasColumnName("GUAR2_ID");
            this.Property(t => t.APBATCH).HasColumnName("APBATCH");
            this.Property(t => t.REST).HasColumnName("REST");
            this.Property(t => t.HARDCODEP).HasColumnName("HARDCODEP");
            this.Property(t => t.HARDCODEG1).HasColumnName("HARDCODEG1");
            this.Property(t => t.HARDCODEG2).HasColumnName("HARDCODEG2");
            this.Property(t => t.DISCPERC).HasColumnName("DISCPERC");
            this.Property(t => t.ADMISIONID).HasColumnName("ADMISIONID");
            this.Property(t => t.PATPCODE).HasColumnName("PATPCODE");
            this.Property(t => t.G1PCODE).HasColumnName("G1PCODE");
            this.Property(t => t.G2PCODE).HasColumnName("G2PCODE");
            this.Property(t => t.SECURED).HasColumnName("SECURED");
            this.Property(t => t.KACT).HasColumnName("KACT");
            this.Property(t => t.AREACT).HasColumnName("AREACT");
            this.Property(t => t.ORACT).HasColumnName("ORACT");
            this.Property(t => t.PATAMTACT).HasColumnName("PATAMTACT");
            this.Property(t => t.INS1AMTACT).HasColumnName("INS1AMTACT");
            this.Property(t => t.INS2AMTACT).HasColumnName("INS2AMTACT");
            this.Property(t => t.DISCOUNTA).HasColumnName("DISCOUNTA");
            this.Property(t => t.REPOST).HasColumnName("REPOST");
            this.Property(t => t.USERID).HasColumnName("USERID");
            this.Property(t => t.File_Primary_Key).HasColumnName("File Primary Key");
            this.Property(t => t.CONSULTATION).HasColumnName("CONSULTATION");
            this.Property(t => t.CSTCTRID).HasColumnName("CSTCTRID");
            this.Property(t => t.CLASSID).HasColumnName("CLASSID");
            this.Property(t => t.COVERAGEPLANID1).HasColumnName("COVERAGEPLANID1");
            this.Property(t => t.COVERAGEPLANID2).HasColumnName("COVERAGEPLANID2");
            this.Property(t => t.ClassGuar1_Id).HasColumnName("ClassGuar1_Id");
            this.Property(t => t.ClassGuar2_Id).HasColumnName("ClassGuar2_Id");
            this.Property(t => t.VisitCeiling1).HasColumnName("VisitCeiling1");
            this.Property(t => t.VisitCeiling2).HasColumnName("VisitCeiling2");
            this.Property(t => t.vglbatch).HasColumnName("vglbatch");
            this.Property(t => t.Copayment_start_Value).HasColumnName("Copayment_start_Value");
            this.Property(t => t.Deductible).HasColumnName("Deductible");
            this.Property(t => t.Copayment_End_Value).HasColumnName("Copayment_End_Value");
            this.Property(t => t.Bill_).HasColumnName("Bill#");
            this.Property(t => t.MasterList).HasColumnName("MasterList");
            this.Property(t => t.TotalMasterLstPrice).HasColumnName("TotalMasterLstPrice");
            this.Property(t => t.DaysCeiling1).HasColumnName("DaysCeiling1");
            this.Property(t => t.DaysCeiling2).HasColumnName("DaysCeiling2");
            this.Property(t => t.Billversion).HasColumnName("Billversion");
            this.Property(t => t.Amountbeforedisc).HasColumnName("Amountbeforedisc");
            this.Property(t => t.MasterItem).HasColumnName("MasterItem");
            this.Property(t => t.FlatPriceMode).HasColumnName("FlatPriceMode");
            this.Property(t => t.MedicalAudit).HasColumnName("MedicalAudit");
            this.Property(t => t.FinancialAudit).HasColumnName("FinancialAudit");
            this.Property(t => t.mode).HasColumnName("mode");
            this.Property(t => t.inout).HasColumnName("inout");
            this.Property(t => t.Voucher).HasColumnName("Voucher");
            this.Property(t => t.APPROVED_INS1AMT).HasColumnName("APPROVED_INS1AMT");
            this.Property(t => t.APPROVED_INS2AMT).HasColumnName("APPROVED_INS2AMT");
            this.Property(t => t.APPROVED_INS1).HasColumnName("APPROVED_INS1");
            this.Property(t => t.APPROVED_INS2).HasColumnName("APPROVED_INS2");
            this.Property(t => t.USERID_APPROVEL_INS1).HasColumnName("USERID_APPROVEL_INS1");
            this.Property(t => t.USERID_APPROVEL_INS2).HasColumnName("USERID_APPROVEL_INS2");
            this.Property(t => t.MedicalAuditDate).HasColumnName("MedicalAuditDate");
            this.Property(t => t.FinancialAuditDate).HasColumnName("FinancialAuditDate");
            this.Property(t => t.MedicalAuditUser).HasColumnName("MedicalAuditUser");
            this.Property(t => t.FinancialAuditUser).HasColumnName("FinancialAuditUser");
            this.Property(t => t.ClaimSent1).HasColumnName("ClaimSent1");
            this.Property(t => t.ClaimSent2).HasColumnName("ClaimSent2");
            this.Property(t => t.ClaimSentDate1).HasColumnName("ClaimSentDate1");
            this.Property(t => t.ClaimSentDate2).HasColumnName("ClaimSentDate2");
            this.Property(t => t.ClaimSentUser1).HasColumnName("ClaimSentUser1");
            this.Property(t => t.ClaimSentUser2).HasColumnName("ClaimSentUser2");
            this.Property(t => t.ClaimSent).HasColumnName("ClaimSent");
            this.Property(t => t.ClaimSentDate).HasColumnName("ClaimSentDate");
            this.Property(t => t.ClaimSentUser).HasColumnName("ClaimSentUser");
            this.Property(t => t.WichGuarantor).HasColumnName("WichGuarantor");
            this.Property(t => t.ApprovedDate1).HasColumnName("ApprovedDate1");
            this.Property(t => t.ApprovedDate2).HasColumnName("ApprovedDate2");
            this.Property(t => t.APPROVED).HasColumnName("APPROVED");
            this.Property(t => t.ApprovedDate).HasColumnName("ApprovedDate");
            this.Property(t => t.Approval_user).HasColumnName("Approval_user");
            this.Property(t => t.PaymentID1).HasColumnName("PaymentID1");
            this.Property(t => t.PaymentID2).HasColumnName("PaymentID2");
            this.Property(t => t.PaymentID).HasColumnName("PaymentID");
            this.Property(t => t.Vglbatch1).HasColumnName("Vglbatch1");
            this.Property(t => t.Vglbatch2).HasColumnName("Vglbatch2");
            this.Property(t => t.ClaimDiscountType).HasColumnName("ClaimDiscountType");
            this.Property(t => t.ClaimDiscountType2).HasColumnName("ClaimDiscountType2");
            this.Property(t => t.Reference).HasColumnName("Reference");
            this.Property(t => t.OE_TrackNB).HasColumnName("OE_TrackNB");
        }
    }
}
